import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DatasetPredictionVO, DatasetPredictionForm, DatasetPredictionQuery } from '@/api/wyl/prediction/types';
import { LscForm } from "@/api/lsc/model/types";

/**
 * 查询【请填写功能名称】列表
 * @param query
 * @returns {*}
 */

export const listDatasetPrediction = (query?: DatasetPredictionQuery): AxiosPromise<DatasetPredictionVO[]> => {
  return request({
    url: '/wyl/datasetPrediction/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询【请填写功能名称】详细
 * @param id
 */
export const getDatasetPrediction = (id: string | number): AxiosPromise<DatasetPredictionVO> => {
  return request({
    url: '/wyl/datasetPrediction/' + id,
    method: 'get'
  });
};

/**
 * 新增【请填写功能名称】
 * @param data
 */
export const addDatasetPrediction = (data: DatasetPredictionForm) => {
  return request({
    url: '/wyl/datasetPrediction',
    method: 'post',
    data: data
  });
};

export const updatePredStatus = (data: LscForm) => {
  return request({
    url: '/wyl/datasetPrediction/status',
    method: 'put',
    data: data
  });
};

/**
 * 修改【请填写功能名称】
 * @param data
 */
export const updateDatasetPrediction = (data: DatasetPredictionForm) => {
  return request({
    url: '/wyl/datasetPrediction',
    method: 'put',
    data: data
  });
};

/**
 * 删除【请填写功能名称】
 * @param id
 */
export const delDatasetPrediction = (id: string | number | Array<string | number>) => {
  return request({
    url: '/wyl/datasetPrediction/' + id,
    method: 'delete'
  });
};
